<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <title>九九乘法表</title>
  <style>


  </style>
</head>

<body>
  <!--  <table border="1px" cellspacing="0px" cellpadding="5px">
            <tr>
                <td></td>
            </tr>
        </table>-->
</body>
<script>
  document.write("<table border='1px' cellspacing='0px' cellpadding='5px'>")
  //循环的是行
  for (let i = 1; i <= 9; i++) {
    document.write("<tr>")

    //循环的列
    for (let j = 1; j <i; j++) {
      document.write("<td>")
      let str = j + " X " + i + " = " + (i * j) // 1 X 1 = 1
      document.write(str)
      document.write("</td>")
    }

    document.write("</tr>")

  }
  document.write("</table>")
</script>

</html>